package com.github.llyb120.qiuyasql.core;

import com.github.llyb120.qiuyasql.entity.TableEntity;
import lombok.AllArgsConstructor;
import lombok.Data;

import javax.sql.DataSource;
import java.util.List;

import static com.github.llyb120.qiuyasql.core.ReflectUtil.analyze;


/**
 * @Author: Administrator
 * @Date: 2020/10/4 16:22
 */
@Data
@AllArgsConstructor
public class SqlBuilder {

    private DataSource dataSource;

    public <T> void insert(List<T> items){
        if(items.isEmpty()){
            return;
        }
        T item = items.get(0);
//        analyze(item.getClass());
    }




    public void ensuerTable(Class<?> clz){
        TableEntity entity = analyze(clz);
        if (entity == null) {
            return;
        }
    }
}
